HTTPSession

HTTPSession will not send any read event

abstract
class HTTPSession : Transport , CallBack {}

Constructors

this
this(HTTPSessionController controller, HTTPCodec codec, SessionDown down)
Undocumented in source.

Members

Aliases

StreamID
alias StreamID = HTTPCodec.StreamID
Undocumented in source.

Functions

closeWriteCallBack
void closeWriteCallBack()
Undocumented in source. Be warned that the author may not have intended to support it.
detach
void detach(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
getCodec
HTTPCodec getCodec()
Undocumented in source. Be warned that the author may not have intended to support it.
getLocalAddress
Address getLocalAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
getPeerAddress
Address getPeerAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
inActive
void inActive()
Undocumented in source. Be warned that the author may not have intended to support it.
isDraining
bool isDraining()
Undocumented in source. Be warned that the author may not have intended to support it.
notifyPendingEgress
void notifyPendingEgress()
Undocumented in source. Be warned that the author may not have intended to support it.
onAbort
void onAbort(HTTPTransaction txn, HTTPErrorCode code)
Undocumented in source. Be warned that the author may not have intended to support it.
onActive
void onActive()
Undocumented in source. Be warned that the author may not have intended to support it.
onBody
void onBody(HTTPTransaction txn, ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
onChunkComplete
void onChunkComplete(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
onChunkHeader
void onChunkHeader(HTTPTransaction txn, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
onError
void onError(HTTPTransaction txn, HTTPErrorCode code)
Undocumented in source. Be warned that the author may not have intended to support it.
onHeadersComplete
void onHeadersComplete(HTTPTransaction txn, HTTPMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
onMessageBegin
void onMessageBegin(HTTPTransaction txn, HTTPMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
onMessageComplete
void onMessageComplete(HTTPTransaction txn, bool upgrade)
Undocumented in source. Be warned that the author may not have intended to support it.
onNativeProtocolUpgrade
void onNativeProtocolUpgrade(HTTPTransaction txn, CodecProtocol protocol, string protocolString, HTTPMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
onRead
void onRead(ubyte[] msg)
Undocumented in source. Be warned that the author may not have intended to support it.
onTimeout
void onTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
onWsFrame
void onWsFrame(HTTPTransaction txn, WSFrame wsf)
Undocumented in source. Be warned that the author may not have intended to support it.
pauseIngress
void pauseIngress(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
restCodeC
void restCodeC(HTTPCodec codec)
Undocumented in source. Be warned that the author may not have intended to support it.
resumeIngress
void resumeIngress(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
sendBody
size_t sendBody(HTTPTransaction txn, ubyte[] data, bool eom)
Undocumented in source. Be warned that the author may not have intended to support it.
sendChunkHeader
size_t sendChunkHeader(HTTPTransaction txn, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
sendChunkTerminator
size_t sendChunkTerminator(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
sendEOM
size_t sendEOM(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.
sendHeaders
void sendHeaders(HTTPTransaction txn, HTTPMessage headers, bool eom)
Undocumented in source. Be warned that the author may not have intended to support it.
sendWsData
size_t sendWsData(HTTPTransaction txn, OpCode code, ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
setupOnHeadersComplete
void setupOnHeadersComplete(HTTPTransaction txn, HTTPMessage msg)

Called by onHeadersComplete(). This function allows downstream and upstream to do any setup (like preparing a handler) when headers are first received from the remote side on a given transaction.

setupProtocolUpgrade
void setupProtocolUpgrade(HTTPTransaction txn, CodecProtocol protocol, string protocolString, HTTPMessage msg)
Undocumented in source.
socketWrite
void socketWrite(HTTPTransaction txn, StreamWriteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
transactionTimeout
void transactionTimeout(HTTPTransaction txn)
Undocumented in source. Be warned that the author may not have intended to support it.

Interfaces

logInfoCallback
interface logInfoCallback
Undocumented in source.

Variables

_codec
HTTPCodec _codec;
Undocumented in source.
_controller
HTTPSessionController _controller;
Undocumented in source.
_down
SessionDown _down;
Undocumented in source.
_localAddr
Address _localAddr;
Undocumented in source.
_peerAddr
Address _peerAddr;
Undocumented in source.

Inherited Members

From Transport

pauseIngress
void pauseIngress(HTTPTransaction txn)
Undocumented in source.
resumeIngress
void resumeIngress(HTTPTransaction txn)
Undocumented in source.
transactionTimeout
void transactionTimeout(HTTPTransaction txn)
Undocumented in source.
sendHeaders
void sendHeaders(HTTPTransaction txn, HTTPMessage headers, bool eom)
Undocumented in source.
sendBody
size_t sendBody(HTTPTransaction txn, ubyte[] , bool eom)
Undocumented in source.
sendChunkHeader
size_t sendChunkHeader(HTTPTransaction txn, size_t length)
Undocumented in source.
sendChunkTerminator
size_t sendChunkTerminator(HTTPTransaction txn)
Undocumented in source.
sendEOM
size_t sendEOM(HTTPTransaction txn)
Undocumented in source.
socketWrite
void socketWrite(HTTPTransaction txn, StreamWriteBuffer buffer)
Undocumented in source.
sendWsData
size_t sendWsData(HTTPTransaction txn, OpCode code, ubyte[] data)
Undocumented in source.
notifyPendingEgress
void notifyPendingEgress()
Undocumented in source.
detach
void detach(HTTPTransaction txn)
Undocumented in source.
getLocalAddress
Address getLocalAddress()
Undocumented in source.
getPeerAddress
Address getPeerAddress()
Undocumented in source.
getCodec
HTTPCodec getCodec()
Undocumented in source.
isDraining
bool isDraining()
Undocumented in source.

From CallBack

onMessageBegin
void onMessageBegin(HTTPTransaction txn, HTTPMessage msg)

Called when a new message is seen while parsing the ingress @param stream The stream ID @param msg A newly allocated HTTPMessage

onHeadersComplete
void onHeadersComplete(HTTPTransaction txn, HTTPMessage msg)

Called when all the headers of an ingress message have been parsed @param stream The stream ID @param msg The message @param size Size of the ingress header

onBody
void onBody(HTTPTransaction txn, ubyte[] data)

Called for each block of message body data @param stream The stream ID @param chain One or more buffers of body data. The codec will remove any protocol framing, such as HTTP/1.1 chunk headers, from the buffers before calling this function. @param padding Number of pad bytes that came with the data segment

onChunkHeader
void onChunkHeader(HTTPTransaction txn, size_t length)

Called for each HTTP chunk header.

onChunkComplete
void onChunkComplete(HTTPTransaction txn)

Called when the terminating CRLF is received to end a chunk of HTTP body data.

onMessageComplete
void onMessageComplete(HTTPTransaction txn, bool upgrade)

Called at end of a message (including body and trailers, if applicable) @param stream The stream ID @param upgrade Whether the connection has been upgraded to another protocol.

onError
void onError(HTTPTransaction txn, HTTPErrorCode )

Called when a parsing or protocol error has occurred @param stream The stream ID @param error Description of the error @param newTxn true if onMessageBegin has not been called for txn

onAbort
void onAbort(HTTPTransaction txn, HTTPErrorCode code)

Called when the peer has asked to shut down a stream immediately. @param stream The stream ID @param code The code the stream was aborted with @note Not applicable to all protocols.

onWsFrame
void onWsFrame(HTTPTransaction , WSFrame )
Undocumented in source.
onNativeProtocolUpgrade
void onNativeProtocolUpgrade(HTTPTransaction txn, CodecProtocol protocol, string protocolString, HTTPMessage msg)

Called upon receipt of a valid protocol switch. Return false if protocol switch could not be completed.

Meta